package com.engine.core.exception;

import com.engine.core.rowMapper.JdbcTypeBiz;

public class ContainsSqlInjection extends RuntimeException{

    private static final long serialVersionUID = 1L;

    private String msg;

    private ContainsSqlInjection(String msg){
         super(msg);
    }

    public static void checkSqlStr(String exps){
         if(JdbcTypeBiz.containsSqlInjection(exps)){
             throw new ContainsSqlInjection(exps+" exists SQL Injection detected");
         }
    }

    public static void checkColumnStr(String exps){
        if(JdbcTypeBiz.containsColumnInjection(exps)){
            throw new ContainsSqlInjection(exps+" exists SQL Injection detected");
        }
    }

}
